package dao;

import java.util.List;

import hbt.HibernateUtil;

import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;

public class ArbitroDAO {

	private static ArbitroDAO instancia = null;
	private static SessionFactory sf = null;

	public static ArbitroDAO getInstancia(){
		if(instancia == null){
			sf = HibernateUtil.getSessionFactory();
			instancia = new ArbitroDAO();
		} 
		return instancia;
	}
	
	public void getArbitros(){
		Session session = sf.openSession();
		Query cs = session.createQuery("from Arbitro");
		List<?> objs = cs.list(); 
	    
	    session.close();
		
	}
}
